package com.kischang.blog.web.interceptor;

import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
import org.springframework.stereotype.Component;

@Component
public class RoleIntercept extends AbstractInterceptor{

	private static final long serialVersionUID = -7816441477792104981L;

	@Override
	public String intercept(ActionInvocation invocation) throws Exception {
		String namespace = invocation.getProxy().getNamespace();
		if("/user".equals(namespace)){
			return invocation.invoke();
		}else if("/browse".equals(namespace)){
			return invocation.invoke();
		}else {
			return invocation.invoke();
		}
	}

}